/**
 * 
 */
package cn.shanlin.ok.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.shanlin.ok.model.City;
import cn.shanlin.ok.service.ICityService;

/**
 * @author liyinlong
 *
 * 2017年3月15日下午5:43:04
 */
@Controller
@RequestMapping("/city")
public class CityController {
	@Autowired
	private ICityService cityService;
	@RequestMapping("/getcity")
	public String getCity(HttpServletRequest request){
		City city= cityService.getCityById(1);
		request.setAttribute("city", city);
		return "showCity";
	}
}
